<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport" />
    <meta content="yes" name=" apple-mobile-web-app-capable" />
    <!-- 隐藏状态栏  -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <!-- <title>关于去嗨</title> -->
    <!--     <link rel="stylesheet" href="/h5wx/css/bootstrap.min.css">
    <link rel="stylesheet" href="/h5wx/css/common.css">
    <link rel="stylesheet" href="/h5wx/css/details.css"> -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="css/details.css">
</head>

<body class="receive-body">
    <input type="hidden" id="wx_open_id" value="$!{openid}" />
    <img src="/h5wx/img/receive_coupon.png" alt="">
    <div class="receive-coupon">
        <div class="section2">
            <div class="title">
                <div class="line fl"></div>
                <div class="line fr"></div>
            </div>
            <!-- 输入手机号之前 -->
            <div class="form">
                <h2>送你一张$!{brandName}红包</h2>
                <input id="phoneNum" type="text" placeholder="输入手机号领取" maxlength="11" onkeyup="this.value=this.value.replace(/\D/g,'')">
                <button type="button" onclick="submit()">点击领取</button>
            </div>
        </div>
        <div class="section3">
            <div class="title clearfix">
                <div class="center">
                    <div class="tittle-bg">
                        <h2><i></i>活动规则说明</h2>
                    </div>
                </div>
                <div class="line fl"></div>
                <div class="line fr"></div>
            </div>
            <div class="active-info opacity-p">
                <p>
                    1.使用红包时下单的手机号需为获得券的手机号
                    <br>2.获得红包之后去（$!{publicName}）公众号下单即可使用
                    <br>3.红包仅限在线支付时使用，每次只能使用一张
                    <br>4.$!{brandName}保留对此券的最终解释权
                </p>
            </div>
        </div>
    </div>
</body>
<!-- <script src="/h5wx/js/jquery-1.11.2.min.js"></script>
<script src="/h5wx/js/angular.min.js"></script>
<script src="/h5wx/js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/constants.js"></script>
<script src="/h5wx/js/common.js"></script> -->
<script src="js/jquery-1.11.2.min.js"></script>
<script src="js/angular.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/constants.js"></script>
<script src="js/common.js"></script>
<span style="display:none;"><script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1255764485'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s95.cnzz.com/z_stat.php%3Fid%3D1255764485%26show%3Dpic1' type='text/javascript'%3E%3C/script%3E"));</script></span>
<script>
function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for (var i = 0; i < ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') c = c.substring(1, c.length);
        if (c.indexOf(nameEQ) == 0)
            return c.substring(nameEQ.length, c.length);
    }
    return null;
}


function submit() {
    var openid = readCookie('wxopenid_cookie') == '' ? readCookie('wxopenid_cookie') : $('#wx_open_id').val();
    var phone = $('#phoneNum').val();
    var pass = true;

    if ($('#phoneNum').val() == '') {
        pass = false;
        alert('请输入正确的手机号码！')
    }

    if (pass) {
        $.ajax({
            type: 'POST',
            dataType: 'json',
            url: server_host + '/share/recordAuthorize.do?openid=' + openid + '&phone=' + phone,
            success: function(data) {
                location.reload();
            }
        });
    }

}
</script>
<script>
    _maq.push(['_setMaq', 'hongbao']);
</script>
</html>
</html>
